<?php
//require_once ;
require __DIR__.'/common/common.php';
//$ff=new lib\db\MYSQL();
$s=$_GET['s'];
if ($s){
    $s=str_replace('/','\\',$s);
    $class='\module\\'.$s.'Module';
    //echo $class;\module\login\indexModule
    $tmp=new $class();
    if ($tmp instanceof \connector\template)//判断模块是否有实现\connector\template接口
    {
        $tmp->dispose();
        $tmp->view();
    }else{
        echo '404';
    }
}
//$str='module\login\indexModule';
//$ff=new $str();
//$ff->view();


//var_export($ff);
//var_export($_GET);




/*$data=mysqli_query($mysql,"SELECT * FROM student");
$arr=mysqli_fetch_assoc($data);
mysqli_free_result($data);
//__DIR__，指向当前执行的PHP脚本所在的目录
//include __DIR__.'/home.html';  /mnt/hgfs/wbr/testwork/home.html
//       /home.html路径是在Linux的根目录下的home.html

tmp_val('data',$arr);//$GLOBALS['tmp_val']['data']=$arr;
template('index');//include __DIR__.'/template/index.html';*/


//tmp_val('JS',JS('index','work'));//$GLOBALS['tmp_val']['JS']="/static/js/work/index.js";'tmp_val' =>
/*array (
    'JS' => '/static/js/work/index.js',
),
)*/
//tmp_val('CSS',CSS('index','work'));//$GLOBALS['tmp_val']['CSS']="/static/css/work/index.css";
/*'tmp_val' =>
  array (
      'JS' => '/static/js/work/index.js',
      'CSS' => '/static/css/work/index.css',
  ),
)*/
//template('index','work');/*  /mnt/hgfs/wbr/testwork/template/work/index.html  */